Optimal. Leaf size=5 \[ x+\tanh ^{-1}(\sin (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0944992, antiderivative size = 5, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {4392, 2839, 3770, 8} \[ x+\tanh ^{-1}(\sin (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4392
Rule 2839
Rule 3770
Rule 8
Rubi steps
\begin{align*} \int \frac{\tan (x)}{-\cot (x)+\csc (x)} \, dx &=\int \frac{\sin (x) \tan (x)}{1-\cos (x)} \, dx\\ &=\int 1 \, dx+\int \sec (x) \, dx\\ &=x+\tanh ^{-1}(\sin (x))\\ \end{align*}
Mathematica [B] time = 0.0163073, size = 46, normalized size = 9.2 \[ 2 \left (\frac{x}{2}-\frac{1}{2} \log \left (\cos \left (\frac{x}{2}\right )-\sin \left (\frac{x}{2}\right )\right )+\frac{1}{2} \log \left (\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.095, size = 19, normalized size = 3.8 \begin{align*} \ln \left ( \tan \left ({\frac{x}{2}} \right ) +1 \right ) -\ln \left ( \tan \left ({\frac{x}{2}} \right ) -1 \right ) +x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.67212, size = 53, normalized size = 10.6 \begin{align*} 2 \, \arctan \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) + \log \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1} + 1\right ) - \log \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1} - 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 0.487646, size = 65, normalized size = 13. \begin{align*} x + \frac{1}{2} \, \log \left (\sin \left (x\right ) + 1\right ) - \frac{1}{2} \, \log \left (-\sin \left (x\right ) + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} - \int \frac{\tan{\left (x \right )}}{\cot{\left (x \right )} - \csc{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.13415, size = 27, normalized size = 5.4 \begin{align*} x + \log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) + 1 \right |}\right ) - \log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) - 1 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]